#include "Tools.h"

int wmain(int argc, wchar_t* argv[])
{
    if(argc != 3)
    {
        std::wcerr<<"Wrong parameters\n";
        exit(EXIT_FAILURE);
    }

    std::wstring wsCommand(argv[1]);
  
    if(wsCommand == L"-f")
    {
        if(FindFile(argv[2]))
        {
            std::wcerr<<argv[2]<<" was found\n";
        }
    }

    if(wsCommand == L"-cf")
    {
        if(CreateFolder(argv[2]))
        {
            std::wcerr<<argv[2]<<" was created\n";
        }
                
        if(WriteFolderToRules(argv[2]))
        {
            std::wcerr<<argv[2]<<" was added to rules\n";

            if(ReloadRules())
            {
                std::wcerr<<"Rules were reloaded\n";

                if(FindFile(argv[2]))
                {
                    std::wcerr<<argv[2]<<" was found\n";
                }
            }
        }
    }

    return 0;
}

